package com.bluesmart.mia;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

import android.os.Bundle;
import android.text.Html;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;

public class NoteDetailActivity extends BaseActivity implements OnClickListener{
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_note_detail);

		JSONObject obj = JSON.parseObject(getIntent().getStringExtra("text"));
		
		((TextView) findViewById(R.id.center)).setText(getString(R.string.knowlege));
		((TextView) findViewById(R.id.title)).setText(Html.fromHtml(obj.getString("knowledgeTitle")));
		((TextView) findViewById(R.id.content)).setText(Html.fromHtml(obj.getString("knowledgeContent")));
		findViewById(R.id.left).setOnClickListener(this);
	}

	@Override
	public void onClick(View arg0) {
		if(arg0.getId() == R.id.left) finish();
	}
}
